<!DOCTYPE html>
<html class="iframe-h" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>网站后台管理模版</title>
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/admin.css}"/>
</head>

<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline tool-btn">
                    <button class="layui-btn layui-btn-small layui-btn-normal dealBtn" data-url="/person/toLeaveBillDeal"><i class="layui-icon">&#xe705;</i></button>
                </div>
            </div>
        </form>
        <table class="layui-table" lay-data="{height: 'full', cellMinWidth: 80,  limit:15,limits:[15,30],
						url:'/person/leaveExamineList', page:true, id:'test'}" lay-filter="test" id="test">
            <thead>
            <tr>
                <th lay-data="{type:'checkbox'}">ID</th>
                <th lay-data="{field:'proposer',align:'center'}">申请人</th>
                <th lay-data="{field:'type',align:'center',templet: '#typeTem'}">类型</th>
                <th lay-data="{field:'startDateStr',align:'center'}">开始时间</th>
                <th lay-data="{field:'endDateStr',align:'center'}">结束时间</th>
                <th lay-data="{field:'applyDateStr',align:'center'}">申请时间</th>
                <th lay-data="{field:'days',align:'center'}">请假天数</th>
                <th lay-data="{field:'leaveReason', align:'center'}">请假原因</th>
                <th lay-data="{field:'processInstanceId', align:'center'}">流程实例</th>
                <th lay-data="{field:'taskId', align:'center'}">任务ID</th>
                <th lay-data="{field:'taskName', align:'center'}">任务名称</th>
            </tr>
            </thead>
        </table>

    </div>
</div>


<script th:src="@{/layui/layui.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/js/common.js}" type="text/javascript" charset="utf-8"></script>
<script type="text/html" id="typeTem">
    {{#  if(d.leaveType== 0){ }}
    事假
    {{#  }else if(d.leaveType== 1){ }}
    病假
    {{#  }}}
</script>
<script>
    layui.use(['table','tree'], function() {
        var table = layui.table,
            form = layui.form,
            tree = layui.tree;

        table.on('tool(test)', function(obj){
            var data = obj.data;


        });
        form.on('select(status)', function(data) {
            var type = data.value;
            table.reload('test', {
                page: {
                    curr: 1 //重新从第 1 页开始
                }
                , where: {
                    type: type
                }
            })
        })

    });

</script>
</body>

</html>